import utils_analysis as analysis
from pathlib import Path
import itertools


if __name__ == "__main__":
    main_dir = Path(__file__).resolve().parents[1]

    analysis.save_correlation_tables(
        strategy="same_method", correlation_measure="kendall", normalise=True
    )
    strategies = ["same_method", "same_category", "multi"]
    correlation_strategies = ["kendall", "spearman"]
    for strategy, correlation_strat in list(
        itertools.product(strategies, correlation_strategies)
    ):
        analysis.save_correlation_tables(
            strategy=strategy, normalise=False, correlation_measure=correlation_strat
        )

    analysis.score_for_regression()
    # this is a precuation for later
    # who would want to create directories in R?
    Path(main_dir / "graphs").mkdir(parents=True, exist_ok=True)
    Path(main_dir / "graphs/tables/").mkdir(parents=True, exist_ok=True)
    Path(main_dir / "graphs/density/").mkdir(parents=True, exist_ok=True)
    Path(main_dir / "graphs/multi/").mkdir(parents=True, exist_ok=True)
    Path(main_dir / "graphs/regression/").mkdir(parents=True, exist_ok=True)
    Path(main_dir / "graphs/tables/regression_appendix/").mkdir(
        parents=True, exist_ok=True
    )
    Path(main_dir / "graphs/same_category/").mkdir(parents=True, exist_ok=True)
    Path(main_dir / "graphs/same_method/").mkdir(parents=True, exist_ok=True)
